package com.twu.biblioteca;


public class User {


    private String name;
    private String email;
    private String phonenumber;
    private String password;
    private boolean isLoggedIn;

    public User(String name, String email, String phonenumber, String password, boolean isLoggedIn) {

        this.name = name;
        this.email = email;
        this.phonenumber = phonenumber;
        this.password = password;
        this.isLoggedIn = isLoggedIn;
    }

    public boolean isLoggedIn() {
        return this.isLoggedIn;
    }

    public boolean validatePassword(String password) {
        return this.password.equals(password);
    }


    public String toString() {
        return name + " " + email + " " + phonenumber;
    }

    public void authenticate()
    {
        this.isLoggedIn = true;
    }

}
